﻿using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZyGames.Framework.Model;

namespace ZyGames.DZPocker.Model
{
	/// <summary>
	/// 玩家下注记录表
	/// </summary>
	[Serializable, ProtoContract]
	[EntityTable(CacheType.Dictionary, DbConfig.Data)]
	public class UserBetRecord : BaseEntity
	{
		public UserBetRecord()
			: base(false)
		{
		}
		public UserBetRecord(int Id, int userId, int tableId, int betType, int betNum)
			: this()
		{
			ID = Id;
			UserID = userId;
			TableID = tableId;
			BetType = betType;
			BetNum = betNum;
		}
		/// <summary>
		/// ID
		/// </summary>        
		[ProtoMember(1)]
		[EntityField(true)]
		public int ID { get; set; }

		/// <summary>
		/// 玩家ID
		/// </summary>        
		[ProtoMember(2)]
		[EntityField]
		public int UserID { get; set; }

		/// <summary>
		/// 桌子ID
		/// </summary>        
		[ProtoMember(3)]
		[EntityField]
		public int TableID { get; set; }

		/// <summary>
		/// 下注类型
		/// </summary>        
		[ProtoMember(4)]
		[EntityField]
		public int BetType { get; set; }

		/// <summary>
		/// 下注筹码
		/// </summary>        
		[ProtoMember(5)]
		[EntityField]
		public int BetNum { get; set; }

		protected override int GetIdentityId()
		{
			return ID;
		}
	}
}
